package com.project.frba.bi.user;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.project.frba.bifront.client.model.User;

public class UserRowMapper implements RowMapper {

	public Object mapRow(ResultSet result, int index) throws SQLException {
		User user = new User();
		user.setId(result.getLong("id"));
		user.setUsername(result.getString("username"));
		user.setPassword(result.getString("password"));
		user.setPrivilege(result.getString("privilege"));
		return user;
	}
}
